package com.qingdai.emuns;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author LiuZiMing
 * @since 2024-01-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("commodity__commodity")
@Document(indexName="commodity")
@Schema(description = "商品")
public class Commodity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @Id
    @Schema(description = "id")
    private Integer id;

    @TableField("title")
    @Field(type = FieldType.Text)
    @Schema(description = "标题")
    private String title;

    @TableField("price")
    @Field(type = FieldType.Double)
    @Schema(description = "价格")
    private Double price;

    @TableField("shipping_address_id")
    @Field(type = FieldType.Integer)
    @Schema(description = "发货地址id")
    private Integer shippingAddressId;

    @TableField("w_describe")
    @Field(type = FieldType.Text)
    @Schema(description = "描述")
    private String wDescribe;

    @TableField("shop_id")
    @Field(type = FieldType.Integer)
    @Schema(description = "所属商店id")
    private Integer shopId;
}
